package PTA2.ti26;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n=scanner.nextInt();
        if(n>120){
            int m=n-120;
            System.out.println(20*n+40*m);
        }
        else if(n<120&&n>0){
            System.out.println(20*n);
        }
        else {
            System.out.println(0);
        }
        scanner.close();
    }
}
